s = 5
else:
s = 6
+
+ if s == 6:
+ # special case when the partner is imported from a file,
+ # in this case is has a valid membership lines but
+ # no payment information associated, consider it valid
+
+ no_payment_info_at_all = True
+ valid_line = False
+
+ for mline in partner_data.member_lines:
+ if mline.date_to >= today:
+ valid_line = True
+
+ if mline.account_invoice_line or mline.pos_order_line:
+ no_payment_info_at_all = False
+
+ if no_payment_info_at_all and valid_line:
+ s = 0
+
if s == 0:
res[id] = 'paid'
elif s == 1: